<!--
 * @Description: JS
 * @Author: rendc
 * @Date: 2024-07-29 09:54:31
 * @LastEditors: rendc
 * @LastEditTime: 2024-07-29 11:42:46
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script type="text/javascript" src="hello.js"></script>
</head>

<body>
  hello,js
</body>
<script>
  let a = 1;
  console.log('🤡 CC - a:', a);
  let s1 = 's1';
  let s2 = "s2";
  let s3 = "乔治是一只'小猪'";
  console.log('🤡 CC - s3:', s3);
  let s4 = '乔治是一只"小猪"';
  console.log('🤡 CC - s4:', s4);
  console.log('🤡 CC - s4.length:', s4.length);
  let s5 = "换\n行";
  console.log('🤡 CC - s5:', s5);


  let n1 = 1;
  let n2 = 2;
  let n3 = 10; //十进制
  let n4 = 010; // 八进制
  let n5 = 0x00; // 十六进制
  let n6 = 0xFF;

  let o9 = {
    name: "小狗",
    age: 2,
    // sayHello() {
    //   console.log('小狗:汪汪');
    // }
  }
  console.log('🤡 CC - o9:', o9);
  console.log('🤡 CC - o9.name:', o9.name);
  console.log('🤡 CC - o9.age:', o9.age);
  console.log('🤡 CC - o9[age]:', o9['age']);

  let arr = [1, 2, 3];
  console.log('🤡 CC - arr:', arr);
  console.log('🤡 CC - arr[0]:', arr[0]); // 1

  // 函数声明 函数名add 形参列表a，b
  function add(a, b) {
    // 返回值
    return a + b;
  }
  console.log('🤡 CC - add(1, 2):', add(1, 2)); // 3
</script>
<style>

</style>

</html>